package com.zhangtai.modules.entity.qw;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import lombok.Data;
import org.junit.Test;

/**
 *
 *
 * @author wanwgei
 * @email i@weiwang.com
 * @date 2021-05-24 10:20:34
 */
@Data
@TableName("tb_qw_checkindata")
public class QwCheckindataEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    private Integer id;
    /**
     *
     */
    private String userid;
    /**
     *
     */
    private String groupname;
    /**
     *
     */
    private String checkinType;
    /**
     *
     */
    private String exceptionType;
    /**
     *
     */
    private Date checkinTime;
    /**
     *
     */
    private String locationTitle;
    /**
     *
     */
    private String locationDetail;
    /**
     *
     */
    private String wifiname;
    /**
     *
     */
    private String notes;
    /**
     *
     */
    private String wifimac;
    /**
     *
     */
    private Integer groupid;
    /**
     *
     */
    private Date schCheckinTime;
    /**
     *
     */
    private Integer timelineId;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getGroupname() {
        return groupname;
    }

    public void setGroupname(String groupname) {
        this.groupname = groupname;
    }

    public String getCheckinType() {
        return checkinType;
    }

    public void setCheckinType(String checkinType) {
        this.checkinType = checkinType;
    }

    public String getExceptionType() {
        return exceptionType;
    }

    public void setExceptionType(String exceptionType) {
        this.exceptionType = exceptionType;
    }

    public Date getCheckinTime() {
        return checkinTime;
    }

    public void setCheckinTime(Date checkinTime) throws ParseException {
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        long time = checkinTime.getTime();
        Date d = new Date(time*1000);
        String format = df.format(d);
        Date parse = df.parse(format);
        this.checkinTime = parse;
    }


    public String getLocationTitle() {
        return locationTitle;
    }

    public void setLocationTitle(String locationTitle) {
        this.locationTitle = locationTitle;
    }

    public String getLocationDetail() {
        return locationDetail;
    }

    public void setLocationDetail(String locationDetail) {
        this.locationDetail = locationDetail;
    }

    public String getWifiname() {
        return wifiname;
    }

    public void setWifiname(String wifiname) {
        this.wifiname = wifiname;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public String getWifimac() {
        return wifimac;
    }

    public void setWifimac(String wifimac) {
        this.wifimac = wifimac;
    }

    public Integer getGroupid() {
        return groupid;
    }

    public void setGroupid(Integer groupid) {
        this.groupid = groupid;
    }

    public Date getSchCheckinTime() {
        return schCheckinTime;
    }

    public void setSchCheckinTime(Date schCheckinTime) throws ParseException {


        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        long time = schCheckinTime.getTime();
        Date d = new Date(time*1000);
        String format = df.format(d);
        Date parse = df.parse(format);
        this.schCheckinTime = parse;
    }

/*    @Test
    public void getdate() throws ParseException {
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date d = new Date(1620653418000L);
        String format = df.format(d);
        Date parse = df.parse(format);
        System.out.println(format);

    }*/

    public Integer getTimelineId() {
        return timelineId;
    }

    public void setTimelineId(Integer timelineId) {
        this.timelineId = timelineId;
    }
}
